set_languages("cxx17")
add_requires("vcpkg::osgearth")
add_requires(
--  'vcpkg::basisu',
 'vcpkg::blend2d',
 'vcpkg::blosc',
 'vcpkg::boost-assert',
 'vcpkg::boost-config',
 'vcpkg::boost-core',
 'vcpkg::boost-move',
 'vcpkg::boost-smart-ptr',
 'vcpkg::boost-static-assert',
 'vcpkg::boost-throw-exception',
 'vcpkg::boost-type-traits',
--  'vcpkg::boost-uninstall',
--  'vcpkg::boost-vcpkg-helpers',
 'vcpkg::brotli',
 'vcpkg::bzip2',
 'vcpkg::cfitsio',
--  'vcpkg::curl',
 'libcurl',
 'opencv',
 'vcpkg::dirent',
 'vcpkg::draco',
 'vcpkg::egl-registry',
 'vcpkg::expat',
 'vcpkg::fontconfig',
 'vcpkg::freeglut',
 'vcpkg::freetype',
 'vcpkg::freexl',
 'vcpkg::gdal',
 'vcpkg::geos',
--  'vcpkg::getopt',
 'vcpkg::getopt-win32',
--  'vcpkg::gettext',
 'vcpkg::gettext-libintl',
 'vcpkg::giflib',
 'vcpkg::glew',
--  'vcpkg::gperf',
 'vcpkg::hdf5',
 'vcpkg::imath',
 'vcpkg::jasper',
 'vcpkg::json-c',
 'vcpkg::lerc',
 'vcpkg::libgeotiff',
 'vcpkg::libgta',
 'vcpkg::libiconv',
 'vcpkg::libjpeg-turbo',
 'vcpkg::libkml',
 'vcpkg::liblzma',
 'vcpkg::libpng',
 'vcpkg::libpq',
 'vcpkg::libspatialite',
 'vcpkg::libsquish',
 'vcpkg::libwebp',
 'vcpkg::libxml2',
 'vcpkg::libzip',
 'vcpkg::lodepng',
 'vcpkg::lz4',
 'vcpkg::minizip',
 'vcpkg::netcdf-c',
 'vcpkg::nlohmann-json',
 'vcpkg::nvtt',
 'vcpkg::openexr',
 'vcpkg::opengl',
 'vcpkg::opengl-registry',
 'vcpkg::openjpeg',
 'vcpkg::openssl',
 'vcpkg::osg',
 'vcpkg::pcre2',
 'vcpkg::pkgconf',
 'vcpkg::proj',
 'vcpkg::protobuf',
--  'vcpkg::pthread',
 'vcpkg::pthreads',
 'vcpkg::qhull',
 'vcpkg::snappy',
 'vcpkg::sqlite3',
 'vcpkg::szip',
 'vcpkg::tiff',
 'vcpkg::tinyxml',
 'vcpkg::uriparser',
--  'vcpkg::vcpkg-cmake',
--  'vcpkg::vcpkg-cmake-config',
--  'vcpkg::vcpkg-cmake-get-vars',
--  'vcpkg::vcpkg-pkgconfig-get-modules',
--  'vcpkg::vcpkg-tool-meson',
 'vcpkg::zlib',
 'vcpkg::zstd',
 'vcpkg::cryptopp')

if is_plat("windows") then -- for MSVC
    add_cxflags("/utf-8")
    add_cxflags("/MT")
    add_ldflags("/subsystem:console")
end

-- manual configuration
local PYTHON_PATH = "D:/Python/"

target("SandBox")
    add_rules("qt.application")
    set_targetdir("build")
    add_defines("QT_MESSAGELOGCONTEXT")
    if is_plat("windows") then
        add_defines("WIN32")
    end
    

    add_packages("vcpkg::osgearth")
    add_packages(
        -- 'vcpkg::basisu',
        'vcpkg::blend2d',
        'vcpkg::blosc',
        'vcpkg::boost-assert',
        'vcpkg::boost-config',
        'vcpkg::boost-core',
        'vcpkg::boost-move',
        'vcpkg::boost-smart-ptr',
        'vcpkg::boost-static-assert',
        'vcpkg::boost-throw-exception',
        'vcpkg::boost-type-traits',
        -- 'vcpkg::boost-uninstall',
        -- 'vcpkg::boost-vcpkg-helpers',
        'vcpkg::brotli',
        'vcpkg::bzip2',
        'vcpkg::cfitsio',
        -- 'vcpkg::curl',
        'libcurl',
        'opencv',
        'vcpkg::dirent',
        'vcpkg::draco',
        'vcpkg::egl-registry',
        'vcpkg::expat',
        'vcpkg::fontconfig',
        'vcpkg::freeglut',
        'vcpkg::freetype',
        'vcpkg::freexl',
        'vcpkg::gdal',
        'vcpkg::geos',
        -- 'vcpkg::getopt',
        'vcpkg::getopt-win32',
        -- 'vcpkg::gettext',
        'vcpkg::gettext-libintl',
        'vcpkg::giflib',
        'vcpkg::glew',
        -- 'vcpkg::gperf',
        'vcpkg::hdf5',
        'vcpkg::imath',
        'vcpkg::jasper',
        'vcpkg::json-c',
        'vcpkg::lerc',
        'vcpkg::libgeotiff',
        'vcpkg::libgta',
        'vcpkg::libiconv',
        'vcpkg::libjpeg-turbo',
        'vcpkg::libkml',
        'vcpkg::liblzma',
        'vcpkg::libpng',
        'vcpkg::libpq',
        'vcpkg::libspatialite',
        'vcpkg::libsquish',
        'vcpkg::libwebp',
        'vcpkg::libxml2',
        'vcpkg::libzip',
        'vcpkg::lodepng',
        'vcpkg::lz4',
        'vcpkg::minizip',
        'vcpkg::netcdf-c',
        'vcpkg::nlohmann-json',
        'vcpkg::nvtt',
        'vcpkg::openexr',
        'vcpkg::opengl',
        'vcpkg::opengl-registry',
        'vcpkg::openjpeg',
        'vcpkg::openssl',
        'vcpkg::osg',
        'vcpkg::pcre2',
        'vcpkg::pkgconf',
        'vcpkg::proj',
        'vcpkg::protobuf',
        -- 'vcpkg::pthread',
        'vcpkg::pthreads',
        'vcpkg::qhull',
        'vcpkg::snappy',
        'vcpkg::sqlite3',
        'vcpkg::szip',
        'vcpkg::tiff',
        'vcpkg::tinyxml',
        'vcpkg::uriparser',
        -- 'vcpkg::vcpkg-cmake',
        -- 'vcpkg::vcpkg-cmake-config',
        -- 'vcpkg::vcpkg-cmake-get-vars',
        -- 'vcpkg::vcpkg-pkgconfig-get-modules',
        -- 'vcpkg::vcpkg-tool-meson',
        'vcpkg::zlib',
        'vcpkg::zstd',
        'vcpkg::cryptopp')

    add_files("src/*.h")
    add_files("src/*.cpp")
    add_files("src/*.ui")
    add_files("src/common/*.h")
    add_files("src/common/*.cpp")

    add_includedirs(PYTHON_PATH .. "include")
    add_linkdirs(PYTHON_PATH .. "libs")

    add_frameworks("QtWidgets")
    add_frameworks("QtCharts")
    add_frameworks("QtSql")
